import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import About from '@/components/About'
import News from '@/components/News'
import Player from '@/components/Player'
import PlayerProfile from '@/components/Player/Profile'
import PlayerStats from '@/components/Player/Stats'
import SettingDetail from '@/components/setting/Detail'
import SettingHeader from '@/components/setting/Header'
import SettingSidebar from '@/components/setting/Sidebar'
import User from '@/components/User'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      components: {
          myHeader: SettingHeader,
          mySidebar: SettingSidebar,
          myDetail: SettingDetail
      }
  },
  {
    path: '/user/:uid/:nationality',
    name: 'User',
    component: User,
    props: true
},
    {
      path: '/hello',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/about',
      name: 'About',
      alias: '/aboutme',
      component: About
  },
  {
    path: '/curry',
    redirect: '/player/1'
    //redirect: { name: 'About' }
    //redirect: '/about'
  },
  {
      path: '/news',
      name: 'News',
      component: News
  },
  {
    path: '/player/:uid',
    name: 'Player',
    component: Player,
    children: [
      {
          path: 'profile',
          component: PlayerProfile
      },
      {
          path: 'stats',
          component: PlayerStats
      },
   ]}
  ]
})
